.class public Lcom/instagram/android/a/b/k;
.super Ljava/lang/Object;
.source "PendingMediaRowViewBinder.java"


# direct methods
.method private static a(Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable;
    .locals 3
    .parameter

    .prologue
    const/16 v2, 0x37

    .line 178
    new-instance v0, Landroid/graphics/drawable/AnimationDrawable;

    invoke-direct {v0}, Landroid/graphics/drawable/AnimationDrawable;-><init>()V

    .line 179
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/AnimationDrawable;->setOneShot(Z)V

    .line 180
    sget v1, Lcom/facebook/av;->upload_progress_repeat_horizontal0:I

    invoke-static {p0, v1}, Lcom/instagram/android/a/b/k;->a(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V

    .line 181
    sget v1, Lcom/facebook/av;->upload_progress_repeat_horizontal1:I

    invoke-static {p0, v1}, Lcom/instagram/android/a/b/k;->a(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V

    .line 182
    sget v1, Lcom/facebook/av;->upload_progress_repeat_horizontal2:I

    invoke-static {p0, v1}, Lcom/instagram/android/a/b/k;->a(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V

    .line 183
    sget v1, Lcom/facebook/av;->upload_progress_repeat_horizontal3:I

    invoke-static {p0, v1}, Lcom/instagram/android/a/b/k;->a(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V

    .line 184
    sget v1, Lcom/facebook/av;->upload_progress_repeat_horizontal4:I

    invoke-static {p0, v1}, Lcom/instagram/android/a/b/k;->a(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/AnimationDrawable;->addFrame(Landroid/graphics/drawable/Drawable;I)V

    .line 185
    return-object v0
.end method

.method private static a(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Drawable;
    .locals 5
    .parameter
    .parameter

    .prologue
    .line 189
    sget v0, Lcom/facebook/au;->pending_media_upload_bar_padding:I

    invoke-virtual {p0, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    .line 190
    sget v1, Lcom/facebook/au;->pending_media_upload_bar_corner_radius:I

    invoke-virtual {p0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 192
    new-instance v2, Lcom/instagram/android/feed/ui/h;

    invoke-static {p0, p1}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v3

    invoke-direct {v2, p0, v3}, Lcom/instagram/android/feed/ui/h;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    .line 194
    sget-object v3, Landroid/graphics/Shader$TileMode;->REPEAT:Landroid/graphics/Shader$TileMode;

    sget-object v4, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;

    invoke-virtual {v2, v3, v4}, Lcom/instagram/android/feed/ui/h;->a(Landroid/graphics/Shader$TileMode;Landroid/graphics/Shader$TileMode;)V

    .line 195
    invoke-virtual {v2, v1, v1}, Lcom/instagram/android/feed/ui/h;->a(II)V

    .line 196
    invoke-virtual {v2, v0, v0}, Lcom/instagram/android/feed/ui/h;->b(II)V

    .line 197
    return-object v2
.end method

.method public static a(Landroid/content/Context;Lcom/instagram/android/a/b/p;)Landroid/view/View;
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 142
    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    .line 144
    sget-object v0, Lcom/instagram/android/a/b/p;->a:Lcom/instagram/android/a/b/p;

    if-ne p1, v0, :cond_0

    sget v0, Lcom/facebook/ax;->row_pending_media:I

    .line 146
    :goto_0
    const/4 v2, 0x0

    invoke-virtual {v1, v0, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    .line 148
    new-instance v2, Lcom/instagram/android/a/b/n;

    invoke-direct {v2}, Lcom/instagram/android/a/b/n;-><init>()V

    .line 150
    sget v0, Lcom/facebook/aw;->row_pending_media_imageview:I

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v2, Lcom/instagram/android/a/b/n;->b:Landroid/widget/ImageView;

    .line 151
    sget v0, Lcom/facebook/aw;->row_pending_media_imageview_overlay:I

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v2, Lcom/instagram/android/a/b/n;->c:Landroid/widget/ImageView;

    .line 152
    sget v0, Lcom/facebook/aw;->row_pending_media_retry_button:I

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, v2, Lcom/instagram/android/a/b/n;->d:Landroid/widget/Button;

    .line 153
    sget v0, Lcom/facebook/aw;->row_pending_media_cancel_button:I

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, v2, Lcom/instagram/android/a/b/n;->e:Landroid/widget/Button;

    .line 154
    sget v0, Lcom/facebook/aw;->row_pending_media_progress_bar:I

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, v2, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    .line 155
    sget v0, Lcom/facebook/aw;->row_pending_media_text_view_status:I

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v2, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    .line 157
    iget-object v0, v2, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    invoke-static {v0}, Lcom/instagram/android/a/b/k;->a(Landroid/widget/ProgressBar;)V

    .line 159
    invoke-virtual {v1, v2}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 161
    return-object v1

    .line 144
    :cond_0
    sget v0, Lcom/facebook/ax;->row_pending_direct_share:I

    goto :goto_0
.end method

.method public static a(Landroid/content/Context;Lcom/instagram/android/a/b/n;Lcom/instagram/pendingmedia/model/c;)V
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 61
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->a:Lcom/instagram/pendingmedia/model/c;

    if-eqz v0, :cond_0

    iget-object v0, p1, Lcom/instagram/android/a/b/n;->a:Lcom/instagram/pendingmedia/model/c;

    invoke-virtual {v0}, Lcom/instagram/pendingmedia/model/c;->v()Lcom/instagram/pendingmedia/model/d;

    move-result-object v0

    if-ne v0, p1, :cond_0

    .line 62
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->a:Lcom/instagram/pendingmedia/model/c;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/instagram/pendingmedia/model/c;->a(Lcom/instagram/pendingmedia/model/d;)V

    .line 64
    :cond_0
    iput-object p2, p1, Lcom/instagram/android/a/b/n;->a:Lcom/instagram/pendingmedia/model/c;

    .line 65
    invoke-virtual {p2, p1}, Lcom/instagram/pendingmedia/model/c;->a(Lcom/instagram/pendingmedia/model/d;)V

    .line 67
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->b:Landroid/widget/ImageView;

    invoke-virtual {p2}, Lcom/instagram/pendingmedia/model/c;->q()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageURI(Landroid/net/Uri;)V

    .line 69
    invoke-virtual {p2}, Lcom/instagram/pendingmedia/model/c;->M()Z

    move-result v0

    if-nez v0, :cond_1

    .line 70
    invoke-virtual {p2}, Lcom/instagram/pendingmedia/model/c;->c()Lcom/instagram/model/a/a;

    move-result-object v0

    sget-object v1, Lcom/instagram/model/a/a;->b:Lcom/instagram/model/a/a;

    if-ne v0, v1, :cond_2

    .line 71
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->c:Landroid/widget/ImageView;

    sget v1, Lcom/facebook/av;->upload_thumbnail_overlay_video:I

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    .line 77
    :cond_1
    :goto_0
    invoke-static {p1, p2}, Lcom/instagram/android/a/b/k;->b(Lcom/instagram/android/a/b/n;Lcom/instagram/pendingmedia/model/c;)V

    .line 79
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->d:Landroid/widget/Button;

    new-instance v1, Lcom/instagram/android/a/b/l;

    invoke-direct {v1, p0, p2}, Lcom/instagram/android/a/b/l;-><init>(Landroid/content/Context;Lcom/instagram/pendingmedia/model/c;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 86
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->e:Landroid/widget/Button;

    new-instance v1, Lcom/instagram/android/a/b/m;

    invoke-direct {v1, p0, p2}, Lcom/instagram/android/a/b/m;-><init>(Landroid/content/Context;Lcom/instagram/pendingmedia/model/c;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 92
    return-void

    .line 73
    :cond_2
    iget-object v0, p1, Lcom/instagram/android/a/b/n;->c:Landroid/widget/ImageView;

    sget v1, Lcom/facebook/av;->upload_thumbnail_overlay_photo:I

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    goto :goto_0
.end method

.method private static a(Landroid/widget/ProgressBar;)V
    .locals 5
    .parameter

    .prologue
    .line 166
    invoke-virtual {p0}, Landroid/widget/ProgressBar;->getProgressDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/LayerDrawable;

    .line 167
    const v1, 0x102000d

    new-instance v2, Lcom/instagram/android/feed/ui/a;

    invoke-virtual {p0}, Landroid/widget/ProgressBar;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    sget v4, Lcom/facebook/av;->upload_track:I

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-direct {v2, v3}, Lcom/instagram/android/feed/ui/a;-><init>(Landroid/graphics/drawable/Drawable;)V

    invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/LayerDrawable;->setDrawableByLayerId(ILandroid/graphics/drawable/Drawable;)Z

    .line 174
    invoke-virtual {p0}, Landroid/widget/ProgressBar;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/a/b/k;->a(Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {p0, v0}, Landroid/widget/ProgressBar;->setIndeterminateDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 175
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/a/b/n;Lcom/instagram/pendingmedia/model/c;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 30
    invoke-static {p0, p1}, Lcom/instagram/android/a/b/k;->b(Lcom/instagram/android/a/b/n;Lcom/instagram/pendingmedia/model/c;)V

    return-void
.end method

.method private static b(Lcom/instagram/android/a/b/n;Lcom/instagram/pendingmedia/model/c;)V
    .locals 4
    .parameter
    .parameter

    .prologue
    const/16 v3, 0x8

    const/4 v2, 0x0

    .line 95
    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->w()Lcom/instagram/pendingmedia/model/e;

    move-result-object v0

    sget-object v1, Lcom/instagram/pendingmedia/model/e;->c:Lcom/instagram/pendingmedia/model/e;

    if-eq v0, v1, :cond_4

    .line 96
    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->t()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 97
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->d:Landroid/widget/Button;

    invoke-virtual {v0, v3}, Landroid/widget/Button;->setVisibility(I)V

    .line 98
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->e:Landroid/widget/Button;

    invoke-virtual {v0, v3}, Landroid/widget/Button;->setVisibility(I)V

    .line 100
    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->w()Lcom/instagram/pendingmedia/model/e;

    move-result-object v0

    sget-object v1, Lcom/instagram/pendingmedia/model/e;->b:Lcom/instagram/pendingmedia/model/e;

    if-ne v0, v1, :cond_1

    .line 101
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v3}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 102
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    .line 103
    iget-object v1, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->M()Z

    move-result v0

    if-eqz v0, :cond_0

    sget v0, Lcom/facebook/ba;->directshare_sending:I

    :goto_0
    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(I)V

    .line 139
    :goto_1
    return-void

    .line 103
    :cond_0
    sget v0, Lcom/facebook/ba;->finishing_up:I

    goto :goto_0

    .line 107
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 108
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 110
    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->c()Lcom/instagram/model/a/a;

    move-result-object v0

    sget-object v1, Lcom/instagram/model/a/a;->a:Lcom/instagram/model/a/a;

    if-ne v0, v1, :cond_2

    .line 112
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    .line 113
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    sget v1, Lcom/facebook/av;->upload_indeterminate_background:I

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setBackgroundResource(I)V

    goto :goto_1

    .line 117
    :cond_2
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v2}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    .line 118
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 119
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->u()I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setProgress(I)V

    goto :goto_1

    .line 123
    :cond_3
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->d:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setVisibility(I)V

    .line 124
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->e:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setVisibility(I)V

    .line 125
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 127
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    sget v1, Lcom/facebook/ba;->failed_to_upload:I

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 128
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_1

    .line 131
    :cond_4
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->d:Landroid/widget/Button;

    invoke-virtual {v0, v3}, Landroid/widget/Button;->setVisibility(I)V

    .line 132
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->e:Landroid/widget/Button;

    invoke-virtual {v0, v3}, Landroid/widget/Button;->setVisibility(I)V

    .line 133
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->f:Landroid/widget/ProgressBar;

    invoke-virtual {v0, v3}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 135
    iget-object v1, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/c;->M()Z

    move-result v0

    if-eqz v0, :cond_5

    sget v0, Lcom/facebook/ba;->directshare_sent:I

    :goto_2
    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(I)V

    .line 137
    iget-object v0, p0, Lcom/instagram/android/a/b/n;->g:Landroid/widget/TextView;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_1

    .line 135
    :cond_5
    sget v0, Lcom/facebook/ba;->done_exclamation:I

    goto :goto_2
.end method
